INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})

SET(FILES_UI
${CMAKE_CURRENT_SOURCE_DIR}/HdrWizard.ui
${CMAKE_CURRENT_SOURCE_DIR}/EditingTools.ui
${CMAKE_CURRENT_SOURCE_DIR}/HdrPreview.ui)

SET(FILES_H
${CMAKE_CURRENT_SOURCE_DIR}/AutoAntighosting.h)

SET(FILES_CPP
${CMAKE_CURRENT_SOURCE_DIR}/AutoAntighosting.cpp)

SET(FILES_H_QT
${CMAKE_CURRENT_SOURCE_DIR}/HdrWizard.h
${CMAKE_CURRENT_SOURCE_DIR}/EditingTools.h
${CMAKE_CURRENT_SOURCE_DIR}/PreviewWidget.h
${CMAKE_CURRENT_SOURCE_DIR}/HdrPreview.h)

SET(FILES_CPP_QT
${CMAKE_CURRENT_SOURCE_DIR}/HdrWizard.cpp
${CMAKE_CURRENT_SOURCE_DIR}/EditingTools.cpp
${CMAKE_CURRENT_SOURCE_DIR}/PreviewWidget.cpp
${CMAKE_CURRENT_SOURCE_DIR}/HdrPreview.cpp)

INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})

QT5_WRAP_UI(FILES_UI_H ${FILES_UI})
QT5_WRAP_CPP(FILES_MOC ${FILES_H_QT})

ADD_LIBRARY(hdrwizard STATIC ${FILES_H} ${FILES_H_QT} ${FILES_CPP} ${FILES_CPP_QT} ${FILES_MOC} ${FILES_UI_H})
TARGET_LINK_LIBRARIES(hdrwizard Qt5::Core Qt5::Concurrent Qt5::Gui Qt5::Widgets Qt5::Sql)

SET(FILES_CLI_H
${CMAKE_CURRENT_SOURCE_DIR}/HdrCreationItem.h
${CMAKE_CURRENT_SOURCE_DIR}/AutoAntighosting.h
${CMAKE_CURRENT_SOURCE_DIR}/WhiteBalance.h)

SET(FILES_CLI_H_QT
# ${CMAKE_CURRENT_SOURCE_DIR}/HdrInputLoader.h
${CMAKE_CURRENT_SOURCE_DIR}/HdrCreationManager.h)

SET(FILES_CLI_CPP
${CMAKE_CURRENT_SOURCE_DIR}/HdrCreationItem.cpp
${CMAKE_CURRENT_SOURCE_DIR}/AutoAntighosting.cpp
${CMAKE_CURRENT_SOURCE_DIR}/WhiteBalance.cpp)

SET(FILES_CLI_CPP_QT
# ${CMAKE_CURRENT_SOURCE_DIR}/HdrInputLoader.cpp
${CMAKE_CURRENT_SOURCE_DIR}/HdrCreationManager.cpp)

QT5_WRAP_CPP(FILES_CLI_MOC ${FILES_CLI_H_QT})
ADD_LIBRARY(hdrwizard-cli STATIC ${FILES_CLI_H} ${FILES_CLI_H_QT} ${FILES_CLI_CPP} ${FILES_CLI_CPP_QT} ${FILES_CLI_MOC})
TARGET_LINK_LIBRARIES(hdrwizard-cli Qt5::Core Qt5::Concurrent Qt5::Gui Qt5::Widgets Qt5::Sql)

SET(FILES_TO_TRANSLATE ${FILES_TO_TRANSLATE}
    ${FILES_CPP_QT} ${FILES_H_QT}
    ${FILES_CLI_CPP_QT} ${FILES_CLI_H_QT}
    ${FILES_UI}
    PARENT_SCOPE)
SET(LUMINANCE_MODULES_GUI ${LUMINANCE_MODULES_GUI} hdrwizard-cli hdrwizard align PARENT_SCOPE)
SET(LUMINANCE_MODULES_CLI ${LUMINANCE_MODULES_CLI} hdrwizard-cli align PARENT_SCOPE)
